package com.ziytek.web.citizen.pojo;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsAutoIncrement;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsKey;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.ziytek.web.citizen.constant.TableConstant;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/***
 * 成功下发，执行的工艺数据
 * @author fenghx
 * */

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = TableConstant.TABLE_COMMAND_ISSUED)
public class CommandIssued {
    @TableId(type = IdType.AUTO)
    @IsKey
    @IsAutoIncrement
    @Column
    private Long id;

    /**
     * cabinetNo 机柜号
     */
    @Column(comment = "cabinetNo")
    private String cabinetNo;

    /**
     * boardNo  行号
     */
    @Column(comment = "boardNo")
    private Integer boardNo;

    /**
     * channelNo  通道号
     */
    @Column(comment = "channelNo")
    private Integer channelNo;

    /**
     * stepId  工步方案ID
     */
    @Column(comment = "stepId")
    private Long stepId;

    /**
     * settings  工步方案详情
     */
    @Column(comment = "settingsDetail")
    private String settingsDetail;

    /**
     * orderNo  工步执行序列号
     */
    @Column(comment = "orderNo")
    private Integer orderNo;

    /**
     * 预计执行时间(正整数,单位分钟) setType = standing时必须大于0
     */
    @Column(comment = "expectedTime")
    private Integer expectedTime;

    /**
     * 工步已执行时间 单位毫秒
     */
    @Column(comment = "hasExecutedTime")
    private Long hasExecutedTime;

    /**
     * 完成状态 0-未完成 1-已完成
     */
    @Column(comment = "finishedStatus")
    private Integer finishedStatus;

    @Column(comment = "createTime")
    private Long createTime;

    @Column(comment = "firstDataTime")
    private Long firstDataTime;

    @Column(comment = "updateTime")
    private Long updateTime;

//    var sql = " `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,`cabinetNo` VARCHAR(8) NOT NULL," +
//            " `boardNo` Integer NOT NULL ,`channelNo` bigint NOT NULL ,`stepId` bigint NOT NULL,"+
//            " `settingsDetail` VARCHAR(200) NOT NULL , `orderNo` bigint NOT NULL ,`expectedTime` bigint NOT NULL ,`hasExecutedTime` bigint NOT NULL,"+
//            " `finishedStatus` INTEGER NOT NULL , `createTime` bigint NOT NULL ,`firstDataTime` bigint NOT NULL ,`updateTime` bigint NOT NULL ";
//        tableMapper.createTable(TableConstant.TABLE_COMMAND_ISSUED, sql);
//
}
